package dbTools.coeModel.modelElement.demos.demo1;

import projectsupporter.common.logic.GlobalInfo;
import dbTools.coeModel.annotation.FillItem;
import dbTools.coeModel.modelElement.AbstractReplaceElement;
import dbTools.tableInfo.info.TableInfo;

public class DemoActionConfig1 extends AbstractReplaceElement {


	@FillItem(itemName = "<##MAST_NAME##>")
	public String fillItemTest(TableInfo tableInfo)
	{
		return tableInfo.getTableName();
	}
	
	@FillItem(itemName = "<##MAST_ID##>")
	public String fillItemTest2(TableInfo tableInfo)
	{
		return tableInfo.getKey();
	}
	
	@FillItem(itemName = "<##MAST_FIELD##>")
	public String fillItemTest3(TableInfo tableInfo)
	{
		return tableInfo.getTableId().toLowerCase();
	}

	@Override
	public String getFileName(TableInfo tableInfo) {
		return "struts-"+tableInfo.getTableId().toLowerCase()+"-master.xml";
	}

	@Override
	public String getFilePath(TableInfo tableInfo) {
		return GlobalInfo.PRJ_NAME+"/config/configs/struts2/master";
	}
}
